# -*- coding:utf-8 -*-
"""Created By Corvo"""


class Event(object):
    """事件基类"""

    def register(self, *args, **kwargs):
        """注册事件"""

    def unregister(self, *args, **kwargs):
        """反注册事件"""


class EventServer(Event):
    """服务端事件"""

    def __init__(self):
        super(EventServer, self).__init__()
        self.recall_storage = {}

    def register(self, instance, event, priority, *args, **kwargs):
        if event not in self.recall_storage:
            self.recall_storage[event] = {}
        recall_storage = self.recall_storage[event]
